from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from . import views


urlpatterns = [
    url(r'^get_user_name_exist/$', views.UserNameExist.as_view()),
    url(r'^get_user_mobile_exist/$', views.UserMobileExist.as_view()),
    url(r'^user_sign/$', views.UserSignCreate.as_view()),
    url(r'^authorizations/$', obtain_jwt_token),  # 登录认证
    url(r'^user_details/$', views.UserDetailView.as_view()),
    url(r'^edit_user_details/$', views.EditDetailsCreate.as_view()),
    url(r'^write_article/$', views.WriteArticleSave.as_view()),
    url(r'^update_time/$', views.UpdateTime.as_view()),
    url(r'^my_article/(?P<user_id>\d+)$', views.MyArticleList.as_view()),
    url(r'^article_detail/(?P<article_id>\d+)$', views.MyArticleDetail.as_view()),
    url(r'^delete_article/(?P<pk>\d+)$', views.ArticleDelete.as_view()),
    url(r'^get_article/', views.GetArticle.as_view()),

]
